@tcolor: #1890ff;

.edc-ds-content {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.edc-ds-content-title {
  padding: 0 20px;
  border-bottom: 1px solid #817e7e;
  height: 40px;
  line-height: 40px;
  font-size: 14px;
}
.edc-ds-condition {
  margin: 0px;
  background: #fff;
  user-select: none;
  padding: 0px;
  max-height: 420px;
  min-height: 250px;
  overflow: hidden;
  &-setting {
    height: 40px;
    width: 100%;
    line-height: 40px;
    &-opt{
      height: 32px;
      line-height: 32px;
    }
    &-delete {
      margin-left: 10px;
      cursor: pointer;
      &:hover{
        color: #1890ff;
      }
    }
    &-plus {
      margin-right: 10px;
      color: #1890ff;
      cursor: pointer;
      display: inline-block;
    }
    &-delete-all{
      cursor: pointer;
      display: inline-block;
    }
  }
  &-content {
    padding: 0px 25px;
    overflow-y: auto;
    max-height: 350px;
    line-height: 40px;
  }
  &-header{
    padding: 8px 10px;
    border-bottom:  1px solid #eaeaea;
  }
  &-group {
    border-bottom: 1px solid #ededed;
    background: #fafafa;
    height: 36px;
    line-height: 36px;
    position: relative;
    z-index: 10;
    padding: 0px 25px;
  }
}
.edc-ds-config {
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
  bottom: 0px;
  margin: 12px;
  background: #fff;
  padding: 25px;
  overflow: auto;
  user-select: none;
  border: 2px solid transparent;

  &.edc-ds-config-highlight {
    border: 2px solid #90b9e8;
  }

  .edc-ds-blank {
    position: absolute;
    text-align: center;
    right: 0;
    left: 0;
    top: 40%;
    font-size: 20px;
    color: #999;
  }
}

.edc-ds-tree-item {
  position: relative;
  height: 38px;
  line-height: 37px;
  width: 218px;
  margin-bottom: 12px;
  border: 1px solid #dedede;
  color: #666;
  border-radius: 2px;
  background: #f1f1f1;

  &:hover {
    .anticon-down {
      display: block;
    }
  }

  .anticon-down {
    display: none;
    position: absolute;
    top: 50%;
    margin-top: -12px;
    padding: 7px;
    font-size: 12px;
    right: 0;
    font-size: 10px;
    cursor: pointer;
  }

  &.edc-ds-active {
    h6 {
      border-left: 2px solid @tcolor;
    }
  }

  &.selected {
    border-color: #4a91e3;
  }

  &.on {
    .selected;
    box-shadow: 0 0 6px #4a91e3;
  }

  h6 {
    border-left: 2px solid transparent;
    padding: 0 25px 0 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: normal;
    font-size: 14px;
    cursor: move;
    cursor: -webkit-grab;
  }

  .edc-ds-tree-opt {
    position: absolute;
    z-index: 9;
    left: -56px;
    top: 50%;
    width: 26px;
    height: 26px;
    line-height: 22px;
    margin-top: -13px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #999;
    background: #fff;
    cursor: pointer;
    
    .anticon-edit {
      display: none;
    }

    &.err {
      border-style: dashed;
      border-color: #ed5565;
    }

    &:hover {
      border: 1px solid @tcolor;

      b {
        display: none;

        & + .anticon-edit {
          display: inline-block;
        }
      }
    }
  }
}

.edc-ds-tree-box {
  white-space: nowrap;
  padding-right: 3px;
}

.edc-ds-tree-wrap {
  overflow: hidden;
  margin-left: -4px;

  .edc-ds-tree-box {
    margin-left: 115px;

    &:first-child > .edc-ds-tree-item {
      &:before {
        position: absolute;
        z-index: 200;
        top: -1px;
        left: -89px;
        width: 1px;
        height: 20px;
        background: #fff;
        content: "";
      }

      &:after {
        position: absolute;
        top: 19px;
        left: -120px;
        width: 120px;
        border-top: 1px solid #dedede;
        content: "";
      }
    }

    & + .edc-ds-tree-box > .edc-ds-tree-item {
      &:before {
        position: absolute;
        left: -89px;
        top: -10000px;
        bottom: 25px;
        border-left: 1px solid #dedede;
        content: "";
      }

      &:after {
        position: absolute;
        top: 8px;
        left: -89px;
        width: 87px;
        height: 10px;
        border: 1px solid #dedede;
        border-width: 0 0 1px 1px;
        border-bottom-left-radius: 10px;
        content: "";
      }
    }
  }
}

.edc-ds-tree-item,
.edc-ds-tree-wrap {
  position: relative;
  display: inline-block;
  vertical-align: top;
}